package com.junlong0716.enjoylearning.ui

import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.support.v7.widget.LinearLayoutManager
import android.view.LayoutInflater
import android.view.View
import com.junlong0716.enjoylearning.R
import com.junlong0716.enjoylearning.adapter.StudyHistoryAdapter
import kotlinx.android.synthetic.main.activity_study_note.*
import kotlinx.android.synthetic.main.view_title_bar.*

class StudyNoteActivity : AppCompatActivity(),View.OnClickListener{
    private lateinit var studyHistoryAdapter: StudyHistoryAdapter
    private lateinit var data: ArrayList<String>

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_study_note)
        initView()

    }

    private fun initView() {
        rl_back.setOnClickListener(this)
        tv_title.text = "我的笔记"

//        data = ArrayList()
//        studyHistoryAdapter = StudyHistoryAdapter(data, R.layout.item_study_history)
//        rv_note.layoutManager = LinearLayoutManager(this)
//        rv_note.adapter = studyHistoryAdapter
//        studyHistoryAdapter.emptyView = LayoutInflater.from(this).inflate(R.layout.view_empty, null)
//    }
    }
    override fun onClick(v: View?) {
        when (v!!.id) {
            R.id.rl_back -> {
                finish()
            }
            else -> {
            }
        }
    }
}
